package cn.hdu.liang.ch2;

//代码清单2-9 堆分配示例 TestHeapGC
public class TestHeapGC {
    public static void main(String[] args) {
        byte[] b1 = new byte[1024 * 1024 / 2];
        byte[] b2 = new byte[1024 * 1024 * 8];
        b2 = null;
        b2 = new byte[1024 * 1024 * 8]; //进行一次年轻代GC
        System.gc();
    }
}
